﻿// <copyright file="ILiteral.cs" company="Alan Dean">
// The MIT License

// Copyright (c) 2008 Alan Dean

// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:

// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.

// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// </copyright>
// <author>Alan Dean</author>
// <email>alan.dean@thoughtpad.net</email>

namespace Semantic.Rdf
{
    using System;

    /// <summary>Defines the RDF Literal interface.</summary>
    /// 
    /// <remarks>
    /// <para>
    /// Literals are used to identify values such as numbers and dates by means of a lexical representation.
    /// Anything represented by a literal could also be represented by a URI,
    /// but it is often more convenient or intuitive to use literals.
    /// </para>
    /// <para>A literal may be the object of an RDF statement, but not the subject or the predicate.</para>
    /// <para>
    /// Literals may be plain or typed:
    /// <list type="bullet">
    /// <item>
    /// A <see cref="T:Semantic.Rdf.IPlainLiteral">plain literal</see> is a string combined with an optional language tag.
    /// This may be used for plain text in a natural language.
    /// As recommended in the <see href="http://www.w3.org/TR/rdf-concepts/#ref-rdf-semantics">RDF formal semantics</see>,
    /// these plain literals are self-denoting.
    /// </item>
    /// <item>
    /// A <see cref="T:Semantic.Rdf.ITypedLiteral">typed literal</see> is a string combined with a datatype URI.
    /// It denotes the member of the identified datatype's value space obtained by applying the lexical-to-value mapping to the literal string.
    /// </item>
    /// </list>
    /// </para>
    /// </remarks>
    /// 
    /// <seealso href="http://www.w3.org/TR/rdf-concepts/#section-URI-Vocabulary">
    /// URI-based Vocabulary and Node Identification
    /// </seealso>
    /// <seealso href="http://www.w3.org/TR/rdf-concepts/#section-Literals">Literals</seealso>
    /// <seealso href="http://www.w3.org/TR/rdf-concepts/#section-Literal-Equality">Literal Equality</seealso>
    public interface ILiteral
    {
        #region string LexicalForm
        /// <summary>
        /// Gets the <see href="http://www.w3.org/TR/rdf-concepts/#dfn-lexical-form">lexical form</see>.
        /// </summary>
        /// 
        /// <value>
        /// A <see href="http://www.w3.org/TR/rdf-concepts/#ref-unicode">Unicode</see>
        /// <see langword="string"/>.
        /// </value>
        /// 
        /// <remarks>
        /// All literals have a lexical form being a <see href="http://www.w3.org/TR/rdf-concepts/#ref-unicode">Unicode</see> string,
        /// which SHOULD be in <see href="http://www.w3.org/TR/rdf-concepts/#ref-nfc">Normal Form C [NFC]</see>.
        /// </remarks>
        string LexicalForm
        {
            get;
        }
        #endregion
    }
}